public class Card {

    //属性定义
    long cardNo;  //卡号：字符型
    String password = "000000"; //密码：字符型
    double balance;//余额双精度型
    String username; //姓名：字符型
    String uid; //身份号：字符型

    //行为定义
    Card(long cardNo, int pwd, double balance, String name, String uid){
        this.cardNo = cardNo;
        //this.password = pwd;
        this.balance = balance;
        this.username = name;
        this.uid = uid;
    }
    void deposh(double money){
        if(money > 0){
            balance = balance + money;
        }
    }
    void drawMoney(double money){

        if(money > 0){
            if(money > balance) System.out.println("尼玛的没那么多钱就不要取");
            balance = balance - money;
        }else{
            System.out.println("不取就不要在这里玩好吧（翻白眼）");
        }
    }

    void setPassword(String pwd){
        password = pwd;
    }

    double getBalance(){
        return balance;
    }

    String getName(){
        return username;
    }

    String getPassword(){
        return password;
    }


    void Massage() {
        System.out.println("============== 信息 ==============");
        System.out.println("== 姓名："+username);
        System.out.println("== 卡号："+uid);
        System.out.println("== 余额："+balance);
        System.out.println("=================================");
    }


}
